//package com.moli.iov.gateway.server.codec;
//
//import com.moli.iov.gateway.util.GatewayUtil;
//import com.moli.iov.protocol.codec.VehiclePacket;
//import com.moli.iov.protocol.enums.CommandTag;
//
///**
// * @author fudh
// * @ClassNmme PrinterPacketParser
// * @date 2019/4/19 17:48
// * @Description: 报文解析类
// */
//public class PrinterPacketParser {
//
//
//    /**
//     * 解析上行报文
//     *
//     * @param packet
//     * @return
//     */
//    public static VehiclePacket buildUpPacket(byte[] packet) {
//        //开始位->2 ，command tag
//        int pointer = 2;
//        byte commandByte = GatewayUtil.getByte(packet, pointer);
//        CommandTag command = CommandTag.valOf(commandByte);
//        //开始位->4 ，vin
//        pointer = 4;
//        String vin = GatewayUtil.getVin(packet,4);
//        //开始位->4 ，vin
////        pointer += 2;
////        //数据长度->2 * byte
//////        int length = GatewayUtil.getShort(packet, pointer) - HEAD_LENGHT;
////        pointer += 2;
////        //芯片ID->4 * byte
////        int chipID = GatewayUtil.getInt(packet, pointer);
////        pointer += 4;
////        //设备ID->4 * byte
////        int deviceID = GatewayUtil.getInt(packet, pointer);
////        pointer += 4;
////        //功能码->1 * byte
////        byte function = packet[pointer++];
////        //状态码 ->1 * byte
////        byte state = packet[pointer++];
////        //数据-> length * byte
////        byte[] content = new byte[length];
////        System.arraycopy(packet, pointer, content, 0, length);
////        pointer += length;
////
////        //停止->2 * byte
////        short end = GatewayUtil.getShort(packet, pointer);
////
////        return new GatewayUtil(start, chipID, deviceID, function, state, content, end);
//    }
//}
